package com.zwmuzhi.springcloud.service.impl;

import com.zwmuzhi.springcloud.dao.PaymentDao;
import com.zwmuzhi.springcloud.entities.Payment;
import com.zwmuzhi.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <h3>cloudLearn</h3>
 * <p>PaymentService实现类</p>
 *
 * @author : zwmuzhi
 * @date : 2020-11-05 16:36
 **/
@Service
public class PaymentServiceImpl implements PaymentService {

    //@Resource 按照name注入，@Autowired 按照类型注入
    @Resource
    private PaymentDao paymentDao;

    @Override
    public int create(Payment payment) {
        return paymentDao.create(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
